import router from '@/router/index.js'

import { setToken, getAccessToken } from '@/utils/auth'
router.beforeEach((to, from, next) => {
    window.document.title = to.meta.title
    if (getAccessToken() && getAccessToken() !== 'undefined') {
        next()
    } else {
        setToken(to.query.u2at)
        next()
    }
})
